// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
#include "pch.h"
#include "DebugLoggingExceptionPolicy.h"
#include "Logger.h"

using namespace Weathr;
using namespace Platform;
using namespace std;

void DebugLoggingExceptionPolicy::HandleException(Exception^ exception)
{
    assert(exception != nullptr);
    wostringstream ss;
    ss << "[HR: " << exception->HResult << "] " << exception->Message->Data();

    Logger::LogError(nullptr, ref new String(ss.str().c_str()));
}